
import request from '@/utils/request'


export function getCascader(params:any) {
    return request({
        url: 'system.menus/getCascader',
        method: 'GET',
        params
    })
}
export function getRuleList() {
    return request({
        url: 'system.menus/ruleList',
        method: 'GET'
    })
}



export function getDetail (params:{id:number|string}) {
    return request({
        url: `system.menus/detail`,
        method: 'GET',
        params
    })
}

export function getList (params:any) {
    return request({
        url: 'system.menus/list',
        method: 'GET',
        params
    })
}

export function create (data:any) {
    return request({
        url: 'system.menus/store',
        method: 'POST',
        data
    })
}

export function update (data:any) {
    return request({
        url: `system.menus/update`,
        method: 'PUT',
        data
    })
}
export function updateStatus (data:any) {
    return request({
        url: `system.menus/status`,
        method: 'PUT',
        data
    })
}

export function delMenu (params:{id:number|string}) {
    return request({
        url: `system.menus/delete`,
        method: 'DELETE',
        params
    })
}